Electronics for Artists by Simon Quellen Field

Electronics for Artists by Simon Quellen Field

Author:Simon Quellen Field
Language: eng
Format: epub
Publisher: Chicago Review Press
Published: 2015-04-03T16:00:00+00:00


The program (http://artists.sci-toys.com/random_twinkling_leds.txt) is very simple.

Set all of the pins to be outputs, and then use the random() function to get a number between 0 and 255. Then send that number to port 1. Do the same for port 2. You control how fast the LEDs flash using the delay() function. In this case, 100 milliseconds (1/10 of a second) gives some pretty frenetic flashing. Without the delay, the lights would simply appear to be on, since they would be flashing faster than your eye could detect.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.